<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         id="ycc_webappid" version="2.5">
    <display-name>ycctemplate</display-name>
    <context-param>
        <param-name>log4jConfigLocation</param-name>
        <param-value>/WEB-INF/classes/log4j.properties</param-value>
    </context-param>

    <context-param>
        <param-name>webAppRootKey</param-name>
        <param-value>webapp.ycctemplate</param-value>
    </context-param>
    <!-- Spring ApplicationContext -->
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>
            classpath*:com/zuche/framework/config/spring/frameworkContext.xml,
            classpath*:applicationContext.xml,
            classpath*:dataAccessContext-ibatis-*.xml
        </param-value>
    </context-param>

    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
    </welcome-file-list>

    <filter>
        <filter-name>utfEncodingFilter</filter-name>
        <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
        <init-param>
            <param-name>encoding</param-name>
            <param-value>utf-8</param-value>
        </init-param>
    </filter>
    <filter-mapping>
        <filter-name>utfEncodingFilter</filter-name>
        <url-pattern>*.do_</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>utfEncodingFilter</filter-name>
        <url-pattern>*.do</url-pattern>
    </filter-mapping>

    <!-- CORS过滤器 start -->
    <!--<filter>
        <filter-name>corsFilter</filter-name>
        <filter-class>com.ycc.yccmall.base.filter.CorsFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>corsFilter</filter-name>
        <url-pattern>/api/*</url-pattern>
    </filter-mapping>-->
    <!-- CORS过滤器 end -->

    <listener>
        <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
    </listener>
    <listener>
        <listener-class>com.zuche.framework.extend.spring.ContextLoaderListenerExtend</listener-class>
    </listener>
    <listener>
        <listener-class>com.zuche.framework.common.StartInitListener</listener-class>
    </listener>

    <session-config>
        <session-timeout>30</session-timeout>
    </session-config>

    <servlet>
        <servlet-name>uaa</servlet-name>
        <servlet-class>com.zuche.framework.extend.spring.DispatcherServletExtend</servlet-class>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>classpath:applicationContextMvc.xml</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet>
        <servlet-name>jsp</servlet-name>
        <servlet-class>com.zuche.framework.extend.jsp.FrameworkExtendJspServlet</servlet-class>
        <init-param>
            <param-name>fork</param-name>
            <param-value>false</param-value>
        </init-param>
        <init-param>
            <param-name>xpoweredBy</param-name>
            <param-value>false</param-value>
        </init-param>
        <init-param>
            <param-name>development</param-name>
            <param-value>true</param-value>
        </init-param>
        <load-on-startup>3</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>jsp</servlet-name>
        <url-pattern>*.jsp</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>jsp</servlet-name>
        <url-pattern>*.jspx</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>uaa</servlet-name>
        <url-pattern>*.login</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>uaa</servlet-name>
        <url-pattern>*.logout</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>uaa</servlet-name>
        <url-pattern>*.do_</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>uaa</servlet-name>
        <url-pattern>*.do</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>uaa</servlet-name>
        <url-pattern>*.action</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>uaa</servlet-name>
        <url-pattern>*.xls</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>uaa</servlet-name>
        <url-pattern>*.srv</url-pattern>
    </servlet-mapping>

</web-app>
